FROM tomcat

RUN rm -rf $CATALINA_HOME/webapps/*
ADD target/demo.war $CATALINA_HOME/webapps/
RUN mv $CATALINA_HOME/webapps/demo.war $CATALINA_HOME/webapps/ROOT.war

EXPOSE 8080
CMD ["catalina.sh", "run"]